﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrainingsApp.Model;

namespace TrainingsApp.Logic {
    public class StaticDataSource {
        public static IEnumerable<DropItem> ListYear() {
            for (int i = DateTime.Now.Year - 20; i <= DateTime.Now.Year - 5; i++) {
                yield return new DropItem { Text = i.ToString(), Value = i };
            }
        }


        public static IEnumerable<DropItem> ListMonth() {
            for (int i = 1; i <= 12; i++) {
                yield return new DropItem { Text = i.ToString(), Value = i };
            }
        }

        public static IEnumerable<DropItem> ListDay() {
            for (int i = 1; i <= 31; i++) {
                yield return new DropItem { Text = i.ToString(), Value = i };
            }
        }

        public static List<DropItem> ListPatriarchType() {
            List<DropItem> source = new List<DropItem>(11);
            source.Add(new DropItem { Text = "父亲", Value = 0 });
            source.Add(new DropItem { Text = "母亲", Value = 1 });
            source.Add(new DropItem { Text = "阿姨", Value = 2 });
            source.Add(new DropItem { Text = "叔叔", Value = 3 });
            source.Add(new DropItem { Text = "舅妈", Value = 4 });
            source.Add(new DropItem { Text = "舅舅", Value = 5 });
            source.Add(new DropItem { Text = "外公", Value = 6 });
            source.Add(new DropItem { Text = "外婆", Value = 7 });
            source.Add(new DropItem { Text = "奶奶", Value = 8 });
            source.Add(new DropItem { Text = "爷爷", Value = 9 });
            source.Add(new DropItem { Text = "邻居", Value = 10 });
            source.Add(new DropItem { Text = "其他", Value = 11 });
            return source;
        }
    }


    public class DropItem {
        public string Text { get; set; }

        public long Value { get; set; }
    }
}
